Method of common factors